package pers.dawnyang.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

/**
 * freemarker处理静态资源版本
 * 
 * @author dawn yang
 * @date 2020/12/15
 */
@ControllerAdvice
public class ResourceUrlProviderController {

  @Autowired
  private ResourceUrlProvider resourceUrlProvider;

  @ModelAttribute("urls")
  public ResourceUrlProvider urls() {
    return this.resourceUrlProvider;
  }
}
